home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / Main.bin / RMISecurityException.java < prev    next >
Text File  |  1998-09-22  |  2KB  |  43 lines

  1. /*
  2.  * @(#)RMISecurityException.java    1.3 98/07/01
  3.  *
  4.  * Copyright 1995-1998 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  * 
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14. package java.rmi;
  15.  
  16. /**
  17.  * Signals that a security exception has occurred.
  18.  */
  19. public class RMISecurityException extends java.lang.SecurityException {
  20.     /**
  21.      * Constructs a RMISecurityException with no detail message.
  22.      * A detail message is a String that describes this particular exception.
  23.      */
  24.     public RMISecurityException(String name) {
  25.     super(System.getProperty("security." + name, "security." + name));
  26.     System.out.println("*** Security Exception: " + name + " ***");
  27.     printStackTrace();
  28.     }
  29.  
  30.     /**
  31.      * Constructs a RMISecurityException with the specified detail message.
  32.      * A detail message is a String that describes this particular exception.
  33.      * @param s the detail message
  34.      */
  35.     public RMISecurityException(String name, String arg) {
  36.     super(System.getProperty("security." + name, "security." + name) +
  37.           ": " + arg);
  38.     System.out.println("*** Security Exception: " + name +
  39.                ":" + arg + " ***");
  40.     printStackTrace();
  41.     }
  42. }
  43.